package chap3;
import java.util.Scanner;
public class salary_tax {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入个税金额:");
        double tax = input.nextDouble();
        double salary;
        if(tax>=925){
            salary=15000+(tax-925)/0.15*0.85;
            System.out.println("税前工资为:"+salary+",税后工资为:"+(salary-tax));
        }else if(tax>=225){
            salary=8000+(tax-225)/0.1*0.9;
            System.out.println("税前工资为:"+salary+",税后工资为:"+(salary-tax));
        }else if(tax>0){
            salary=3500+tax/0.05*0.95;
            System.out.println("税前工资为:"+salary+",税后工资为:"+(salary-tax));
        }else{
            System.out.println("工资低于3500,不交税");
        }
    }
}

